
package botlab;

import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.debug.Arrow;

/**
 *
 * @author Quentin
 */
public class Utils
{
    public static void createArrow(ColorRGBA color, Vector3f direction, Node node)
    {
        Arrow arrow = new Arrow(direction.mult(5));
        arrow.setLineWidth(5);
        Geometry geometry = new Geometry("arrow",arrow);
        Material m = new Material(Game.getApp().getAssetManager(),"Common/MatDefs/Misc/Unshaded.j3md");
        m.setColor("Color", color);
        geometry.setMaterial(m);
        node.attachChild(geometry);
    }
    
}
